LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

# only for debug
$(info $(LOCAL_PATH))
$(info $(NDK_ROOT))
$(info $(TARGET_ARCH))


# 第三方库
ifeq ($(TARGET_ARCH), arm)

# arm 平台 头文件目录
LOCAL_C_INCLUDES += $(LOCAL_PATH)/input/arm/inc
# arm 平台 库文件目录
LOCAL_LDLIBS += -L$(LOCAL_PATH)/input/arm/lib
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/input/arm/lib

else ifeq ($(TARGET_ARCH), x86)

# x86 平台 头文件目录
LOCAL_C_INCLUDES += $(LOCAL_PATH)/input/x86/inc
# x86 平台 库文件目录
LOCAL_LDLIBS += -L$(LOCAL_PATH)/input/x86/lib
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/input/x86/lib

endif


# 编译
LOCAL_SRC_FILES += src/test.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/inc
# 系统库
LOCAL_LDLIBS += -ldl -llog -landroid
# 动态库
LOCAL_LDLIBS += -lmath
# 输出文件名
LOCAL_MODULE := libtest
include $(BUILD_SHARED_LIBRARY)